{extend name="public:_base" /}
{block name="js"}
{load href="__STATIC__/echarts/echarts.common.min.js" /}
{include file="public/_validform"}
<script>
    // 绘制图表。
    echarts.init(document.getElementById('main')).setOption({
        title : {
            text: '{$Request.domain}',
            subtext: '投票统计',
            x:'center'
        },
        tooltip : {
            trigger: 'item',
            formatter: "{a} <br/>{b} : {c} ({d}%)"
        },
        legend: {
            orient: 'vertical',
            left: 'right',
        },
        series : [
            {
                name: '访问来源',
                type: 'pie',
                center: ['50%', '60%'],
                label: {
                    normal: {
                        formatter: '{a|{a}}{abg|}\n{hr|}\n  {b|{b}：}{c}  {per|{d}%}  ',
                        backgroundColor: '#eee',
                        borderColor: '#aaa',
                        borderWidth: 1,
                        borderRadius: 4,
                        // shadowBlur:3,
                        // shadowOffsetX: 2,
                        // shadowOffsetY: 2,
                        // shadowColor: '#999',
                        // padding: [0, 7],
                        rich: {
                            a: {
                                color: '#999',
                                lineHeight: 22,
                                align: 'center'
                            },
                            // abg: {
                            //     backgroundColor: '#333',
                            //     width: '100%',
                            //     align: 'right',
                            //     height: 22,
                            //     borderRadius: [4, 4, 0, 0]
                            // },
                            hr: {
                                borderColor: '#aaa',
                                width: '100%',
                                borderWidth: 0.5,
                                height: 0
                            },
                            b: {
                                fontSize: 16,
                                lineHeight: 33
                            },
                            per: {
                                color: '#eee',
                                backgroundColor: '#334455',
                                padding: [2, 4],
                                borderRadius: 2
                            }
                        }
                    }
                },
                data:{$echarts},
                itemStyle: {
                    emphasis: {
                        shadowBlur: 10,
                        shadowOffsetX: 0,
                        shadowColor: 'rgba(0, 0, 0, 0.5)'
                    }
                }
            }
        ]
    });
</script>
{/block}
{block name="main"}

<div class="page-container">
    <div id="main" style=" height:500%;"></div>
        <div class="mt-5">

            <table class="layui-table">
            <thead>
                <tr>
                    <!--<th width="100">投票人</th>-->
                    <th width="200">选票</th>
                    <th width="120">时间</th>
                    <!--<th width="120">操作</th>-->
                </tr>
                </thead>
                <tbody>
                {volist name="record" id="tablelist"}
                        <tr>
                            <!--<td>{$tablelist['id']}</td>-->
                            <td>{$tablelist['itemname']}</td>
                            <td>{$tablelist['touch_time']|date="Y-m-d H:i:s",###}</td>
                            <!--<td>删除</td>-->
                        </tr>
                {/volist}
                </tbody>
            </table>


        </div>
</div>
{/block}